package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:53:44
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelServiceFeatureRelateBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.Id);

        mappedDaoFields.put("serviceId",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.ServiceId);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.Remarks);

        mappedDaoFields.put("serviceName",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.ServiceName);

        mappedDaoFields.put("serviceCanTest",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.ServiceCanTest);

        mappedDaoFields.put("featureVersionRelateId",
            com.ourteam.product.model.dao.IProductModelServiceFeatureRelateDAO.FeatureVersionRelateId);
    }

    private com.ourteam.product.model.dao.ProductModelServiceFeatureRelate productModelServiceFeatureRelate;
    private long featureId;
    private String featureName;
    private String keyFeature;
    private String featureCanTest;
    private long productDefineId;
    private long productVersionId;
    private String productName;
    private String productVersion;

    public ProductModelServiceFeatureRelateBean() {
        super();

        this.productModelServiceFeatureRelate = new com.ourteam.product.model.dao.ProductModelServiceFeatureRelate();
    }

    public ProductModelServiceFeatureRelateBean(
        com.ourteam.product.model.dao.ProductModelServiceFeatureRelate productModelServiceFeatureRelate) {
        super();

        this.productModelServiceFeatureRelate = productModelServiceFeatureRelate;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelServiceFeatureRelate);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelServiceFeatureRelate convertToProductModelServiceFeatureRelate() {
        return this.productModelServiceFeatureRelate;
    }

    public com.ourteam.product.model.dao.ProductModelServiceFeatureRelate convertTo() {
        return this.productModelServiceFeatureRelate;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelServiceFeatureRelate.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelServiceFeatureRelate.setId(id);
    }

    /**
     * Get serviceId
     *
     * @return long
     */
    public long getServiceId() {
        return (long) this.productModelServiceFeatureRelate.getServiceId();
    }

    /**
     * Set serviceId
     *
     * @parameter long
     */
    public void setServiceId(long serviceId) {
        this.productModelServiceFeatureRelate.setServiceId(serviceId);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelServiceFeatureRelate.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelServiceFeatureRelate.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelServiceFeatureRelate.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelServiceFeatureRelate.setRemarks(remarks);
    }

    /**
     * Get serviceName
     *
     * @return String
     */
    public String getServiceName() {
        return (String) this.productModelServiceFeatureRelate.getServiceName();
    }

    /**
     * Get serviceCanTest
     *
     * @return String
     */
    public String getServiceCanTest() {
        return (String) this.productModelServiceFeatureRelate.getServiceCanTest();
    }

    /**
     * Get featureVersionRelateId
     *
     * @return long
     */
    public long getFeatureVersionRelateId() {
        return (long) this.productModelServiceFeatureRelate.getFeatureVersionRelateId();
    }

    /**
     * Set featureVersionRelateId
     *
     * @parameter long
     */
    public void setFeatureVersionRelateId(long featureVersionRelateId) {
        this.productModelServiceFeatureRelate.setFeatureVersionRelateId(featureVersionRelateId);
    }

    /**
     * Get featureId
     *
     * @return long
     */
    public long getFeatureId() {
        return this.featureId;
    }

    /**
     * Set featureId
     *
     * @parameter long
     */
    public void setFeatureId(long featureId) {
        this.featureId = featureId;
    }

    /**
     * Get featureName
     *
     * @return String
     */
    public String getFeatureName() {
        return this.featureName;
    }

    /**
     * Set featureName
     *
     * @parameter String
     */
    public void setFeatureName(String featureName) {
        this.featureName = featureName;
    }

    /**
     * Get keyFeature
     *
     * @return String
     */
    public String getKeyFeature() {
        return this.keyFeature;
    }

    /**
     * Set keyFeature
     *
     * @parameter String
     */
    public void setKeyFeature(String keyFeature) {
        this.keyFeature = keyFeature;
    }

    /**
     * Get featureCanTest
     *
     * @return String
     */
    public String getFeatureCanTest() {
        return this.featureCanTest;
    }

    /**
     * Set featureCanTest
     *
     * @parameter String
     */
    public void setFeatureCanTest(String featureCanTest) {
        this.featureCanTest = featureCanTest;
    }

    /**
     * Get productDefineId
     *
     * @return long
     */
    public long getProductDefineId() {
        return this.productDefineId;
    }

    /**
     * Set productDefineId
     *
     * @parameter long
     */
    public void setProductDefineId(long productDefineId) {
        this.productDefineId = productDefineId;
    }

    /**
     * Get productVersionId
     *
     * @return long
     */
    public long getProductVersionId() {
        return this.productVersionId;
    }

    /**
     * Set productVersionId
     *
     * @parameter long
     */
    public void setProductVersionId(long productVersionId) {
        this.productVersionId = productVersionId;
    }

    /**
     * Get productName
     *
     * @return String
     */
    public String getProductName() {
        return this.productName;
    }

    /**
     * Set productName
     *
     * @parameter String
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * Get productVersion
     *
     * @return String
     */
    public String getProductVersion() {
        return this.productVersion;
    }

    /**
     * Set productVersion
     *
     * @parameter String
     */
    public void setProductVersion(String productVersion) {
        this.productVersion = productVersion;
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelServiceFeatureRelateBean) == false) {
            return false;
        } // end if

        ProductModelServiceFeatureRelateBean other = (ProductModelServiceFeatureRelateBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelServiceFeatureRelate tempProductModelServiceFeatureRelate =
            other.convertToProductModelServiceFeatureRelate();

        if ((tempProductModelServiceFeatureRelate == null) ||
                (this.productModelServiceFeatureRelate == null)) {
            isEqual = false;
        } else if ((tempProductModelServiceFeatureRelate == this.productModelServiceFeatureRelate) ||
                tempProductModelServiceFeatureRelate.equals(
                    this.productModelServiceFeatureRelate)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelServiceFeatureRelateBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceFeatureRelate[] aProductModelServiceFeatureRelates) {
        return toArray(aProductModelServiceFeatureRelates, null);
    }

    public static ProductModelServiceFeatureRelateBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceFeatureRelate[] aProductModelServiceFeatureRelates,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelServiceFeatureRelates)) {
            return new ProductModelServiceFeatureRelateBean[0];
        }

        int length = aProductModelServiceFeatureRelates.length;

        ProductModelServiceFeatureRelateBean[] beans = new ProductModelServiceFeatureRelateBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelServiceFeatureRelateBean(aProductModelServiceFeatureRelates[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelServiceFeatureRelates[i] });
            }
        }

        return beans;
    }
}
